<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器练习</title>
  <Style>
    #l1{color: green}
    .yell{color: yellow}
    input[type="text"],body>p{background-color: red}
    body>div>p{color: pink}
    body div div p{background-color: yellow}

    a:link{color: green}/*未访问*/
    a:visited{color: red}/*访问过*/
    a:hover{color: yellow}/*悬停*/
    a:active{color: pink}/*点击*/
  </Style>
</head>
<body>
<ul>
  <li>刘备</li>
  <li id="l1">关羽</li>
  <li class="yell">张飞</li>
</ul>
<p>香蕉</p>
<p class="yell">苹果</p>
<input type="text">
<input type="password">
<div>
  <p>p1</p>
  <div>
    <p2></p2>
  </div>
  <div>
    <div>
      <p>p3</p>
    </div>
  </div>
</div>
<a href="http://www.youku.com">优酷</a>
</body>
</html>